<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <ul>
        <!-- v-for指令是用于做循环渲染的 -->
        <!-- v-for指令是哪个元素要重复，就加在那个元素上面 -->
        <li v-for="value in list">{{ value }}</li>
      </ul>

      <h2 v-for="(item, index) in list2">{{index}}. {{ item.title }}</h2>
    </div>

    <script src="../Vue.js"></script>
    <script>
      new Vue({
        el: "#app",
        data: {
          list: ["zhangsan", "lisi", "wangwu"],
          list2: [
            {
              id: 1,
              title: "领悟习近平总书记的“青年观”",
            },
            {
              id: 2,
              title: "青春有为 时代有我  接续传承 不负韶华",
            },
            {
              id: 3,
              title: "生命至上 复工  奋斗  生力军  逆行者  青春密码  乐章",
            },
          ],
        },
      });
    </script>
  </body>
</html>
